package edu.unc.comp410.colemangeer.model;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.Logger;

import edu.unc.comp410.colemangeer.demos.ProductsDemo;



public class Catalog {
	
	private static Logger log = Logger.getLogger(Catalog.class);
	private Map<Integer,CatalogItem> catalogItems = new HashMap<Integer,CatalogItem>();
	
	
	public CatalogItem getCatalogItemById(Integer id){
		return catalogItems.get(id);
	}

	public void addCatalogItem(CatalogItem item){
		catalogItems.put(item.getId(), item);
	}
	
	public void logCatalog(){
		Collection<CatalogItem> list = catalogItems.values();
			log.info(list.toString());
	}
	
	//TODO: methods for search by category?
}
